package com.haulmont.asu.web.ui.science_grade;

import com.haulmont.cuba.gui.WindowManager;
import com.haulmont.cuba.gui.components.AbstractLookup;
import com.haulmont.cuba.gui.components.Table;
import com.haulmont.cuba.gui.components.actions.CreateAction;
import com.haulmont.cuba.gui.components.actions.EditAction;

import javax.inject.Inject;
import java.util.Map;

/**
 * Author: Sergey42
 * Date: 23.10.13 12:40
 */
public class ScienceGradeBrowser extends AbstractLookup {

    @Inject
    protected Table scienceGradeTable;

    @Override
    public void init(Map<String, Object> params) {
        super.init(params);

        scienceGradeTable.removeAction(getAction("scienceGradeTable.create"));
        scienceGradeTable.addAction(new CreateAction(scienceGradeTable, WindowManager.OpenType.DIALOG));

        scienceGradeTable.removeAction(getAction("scienceGradeTable.edit"));
        scienceGradeTable.addAction(new EditAction(scienceGradeTable, WindowManager.OpenType.DIALOG));

    }
}
